<template>
  <div class="swiper-container">
    <mt-swipe :auto="4000">
      <mt-swipe-item v-for="(item, key) in homeSwiper" :key="key" >
        <a :href="item.url.substr(0, 4) === 'http' ? item.url : '#'">
          <img :src="item.img" :alt="item.title"/>
        </a>
      </mt-swipe-item>
    </mt-swipe>
  </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
  computed: {
    ...mapState({
      homeSwiper: state => state.homeSwiper
    })
  }
}
</script>

<style scoped>
.swiper-container {
  width: 100%;
  height: 208px;
}
.swiper-container .mint-swipe-item img {
  width: 100%;
  height: 100%;
}
</style>
